package com.example.wlt.personnel_manegement_system.Manager.Person;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.example.wlt.personnel_manegement_system.Adapter.MemberAdapter;
import com.example.wlt.personnel_manegement_system.Item.Item_managemember;
import com.example.wlt.personnel_manegement_system.R;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by WLT on 2016/5/2.
 */
public class Fragment_membermanage extends Fragment {
    private ListView lv_item;//成员管理名单
    @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
            View view = inflater.inflate(R.layout.person_membermanage, container, false);
        lv_item=(ListView)view.findViewById(R.id.lv_membermanage_item);
        //创建数据源
        List<Item_managemember> Item=new ArrayList<>();
        for(int i=0;i<20;i++){
            Item.add(new Item_managemember
                    (
                            "王二"+i,
                            "运营部",
                            "清退"
                    ));
        }
        //加载适配器
        lv_item.setAdapter(new MemberAdapter(this.getActivity(),this.getActivity().getApplicationContext(),Item));
            return view;
        }
}
